package kr.ac.kaist.savehearts.ui;

import kr.ac.kaist.savehearts.SaveHeartsConstants;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class SplashActivity extends Activity {
	
	private static final String TAG = SplashActivity.class.getSimpleName();
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        
        Thread splashThread = new Thread() {
			@Override
			public void run() {
				try {
					sleep(SaveHeartsConstants.SPLASH_DELAY);
				} catch (InterruptedException e) {
					e.printStackTrace();
				} finally {
					finish();
					startActivity(new Intent(getApplicationContext(), StartActivity.class));
				}				
			}        	
        };
        splashThread.start();
    }
}